package assembly.spring.boot.demo.config.mybatis.flex;

import com.mybatisflex.annotation.UpdateListener;

import java.sql.Timestamp;

public class IDTUpdateListener implements UpdateListener {

    @Override
    public void onUpdate(Object o) {
        IDTBaseEntity baseEntity = (IDTBaseEntity) o;
        baseEntity.setModifyTime(new Timestamp(System.currentTimeMillis()));
        baseEntity.setModifierId("system");
    }
}
